In computer related technologies, software validation can be stated as the process of validating and verifying that a software program/application/product meets particular requirements that guided its design and development, works as expected, or satisfies the needs of stakeholders. A primary purpose of software validation is to detect software failures so that defects may be discovered and corrected. The scope of software testing often includes examination of code as well as execution of that code in various environments and conditions. Information derived from software testing may be used to correct the software or even the process by which software is developed.
The code may contain errors such as syntax errors, semantic errors, runtime errors, data type mismatch errors, etc. The process of verifying the constraints of types such as, for example, data types is referred to as type checking. The programming languages, used to write code, may be statically type checked or dynamically type checked. A programming language is said to be statically type checked when type checking is performed during compile time. Examples of statically type checked programming languages include Java, C, C++, etc. A programming language is said to be dynamically type checked when type checking is performed during runtime. Examples of dynamically type checked programming languages include PHP, JavaScript, Ruby, Python, etc.
In programs written using dynamically type checked programming languages such as PHP, errors may not be discovered until the program code is executed. Typically, implementations of dynamically typed languages do not support checking for errors without executing the code. So, the developer is not guaranteed of proper execution of the program until the program is executed. Also, when the program executes, it may be possible that all possible scenarios, use cases, or conditions have not occurred during the execution of the program. Accordingly, there is scope for errors to remain undetected. Further, in scenarios where an application has millions of lines of source code, error detection process becomes a resource intensive task if the code has to be executed every time a small change is introduced to the code. Further, even if the application is written using statically typed programming language, detecting errors in code having millions of lines of code can take a significant amount of time.
Also, since dynamic type checking may result in errors that are discovered at runtime, such errors may occur long after the place where the programming mistake was made, that is, the place where the wrong type of data passed into a place it should not have. This may make the bug difficult to locate.